﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LP580.CG;
public partial class ascx_UserClass : System.Web.UI.UserControl
{
    private int _uid = 0;
    /// <summary>
    /// 用户id值
    /// </summary>
    public int uid
    {
        get { return _uid; }
        set { _uid = value; }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        System.Text.StringBuilder sb = new System.Text.StringBuilder();
        List<NameAndCount> ls = clsGiftProductType.GetNameAndCount(uid);
        if (ls.Count > 0)
        {
            foreach (NameAndCount cls in ls)
            {
                sb.Append("<tr><td height='25' align='left'><img src='images/dianpu_tb.gif' width='13' height='13'></td>");
                sb.AppendFormat("<td height='25' align='left'>{0}({1})</td></tr>", cls.name, cls.count);
            }
        }
        else
        {
            sb.Append("<tr><td colspan='2' align='center'>该商铺没有自定义分类</td></tr>");
        }
        litcon.Text = sb.ToString();
    }
}